home *** CD-ROM | disk | FTP | other *** search
/ Inside Mac Games Volume 3 #4 / IMG 26 April 1995.iso / More Goodies / All Things Marathon / Marathon Editors / Mara. OPE 1.3 / FileFormats / How OPE works next >
Text File  |  1995-03-15  |  7KB  |  182 lines

  1. =====================================================================
  2. How Object Placement Editor (previously NetEdit) Works
  3. By Eric Bennett (ericb@psu.edu, Marathon@emb121.rh.psu.edu)
  4. With assistance from Tom Klancer  (tklancer@cnj.digex.net)
  5. =====================================================================
  6.  
  7. The Object Placement Editor (OPE) looks for the string "plac" in the map file which
  8. indicates the  beginning of the object placement file.  It then backs up about 70 bytes
  9. to get the name of the level.  From "plac" it then goes forward 24 bytes (start of
  10. objects) and 792 bytes (start of characters) to find the placement information which it
  11. edits. The placement record for each character/object is 12 bytes, as follows:
  12.  
  13. Bytes      Value          Significance
  14. -------------------------------------
  15. 1-2        000x            x=random placement flag.  If x=1, then objects are placed
  16.                              randomly on the level.  If x=0, objects are placed in
  17.                              predefined spots (I don't know where the predefined spots
  18.                              are stored).  In net levels, x=1; in regual levels, x is
  19.                              usually zero.
  20. 3-4        00xx           xx=initial number of the object on level
  21. 5-6        00xx           xx=Min # object on level
  22.                              Objects are replenished so that the total number present
  23.                              is greater than or equal to the value in bytes 7-8.
  24. 7-8        00xx           xx=total # of object on level.  The total number of this
  25.                              object will not exceed this value.  Once the Min# is
  26.                              achieved, Marathon _slowly_ adds more until Max# is reached.
  27. 9-10       xxxx           xxxx=total # of additions allowed during course of game in
  28.                              addition to the minimum number which must always be there.
  29.                              An example explains this better: suppose Min# fighters is 2,
  30.                              Max# is 4, Extras is 10.  There will always be at least 2
  31.                              fighters; fighters will be added until up till four are
  32.                              present, but only ten times--after this only the two required
  33.                              fighters will be present. Or you can think of the Min# field
  34.                              as having precedence over the Extras field. 65535 supposedly
  35.                              represents infinite replenishment (as if anyone would play
  36.                              long enough to exhaust 65534 items...).
  37. 11-12      xxxx           xxxx=replenishment frequency.  The higher the value of these
  38.                              bytes, the more often Marathon adds the object in an attempt
  39.                              to reach the Max#.
  40.  
  41.  
  42. The objects start at +24 from "plac":
  43.  
  44. Offset      Record
  45. from          contents
  46. "plac"
  47.  
  48. 24            Pistol
  49. 36            Pistol Ammo
  50. 48            Fusion Pistol
  51. 60            Fusion Battery
  52. 72            AR-75
  53. 84            AR-75 bullet clip
  54. 96            AR-75 grenades
  55. 108            SPNKR
  56. 120            Missiles
  57. 132            Invisibility
  58. 144            Invulnerability
  59. 156            Night Vision
  60. 168            Alien Weapon
  61. 180            Alien Ammo Clip
  62. 192            TOZT
  63. 204            Napalm Canister
  64. 216            Wide-angle view
  65. 228         Defense Center Chip
  66. 240            Alien Energy Converter
  67.  
  68. Technically I think the fist is at offset 12, but no graphic appears on the level for it
  69. (although you _will_ occassionally here a "plunk" as you pick up an invisible fist,
  70. which in any case does not appear under your weapons list).  Going beyond 240 also
  71. causes you to pick up invisible objects, whereas using undefined characters (see below)
  72. causes Marathon to crash.
  73.  
  74. Here are the offsets for the various characters:
  75.  
  76. Offset      Record
  77. from          contents
  78. "plac"
  79.  
  80. 792            Assimilated Civilian ("Exploding Bob")
  81. 804            Minor Fighter
  82. 816            Major Fighter
  83. 828            Minor Bolt Fighter
  84. 840            Major Bolt Fighter
  85. 852            Green civilian
  86. 864            Yellow civilian
  87. 876            Blue civilian
  88. 888            Orange Civilian
  89. 900            Unused
  90. 912            Unused
  91. 924            Minor Enforcer
  92. 936            Major Enforcer
  93. 948            Minor Compiler/S'pht
  94. 960            Major Compiler
  95. 972            Minor Invisible Compiler
  96. 984            Major Invisible Compiler
  97. 996            Minor Hulk
  98. 1008        Major Hulk
  99. 1020        Minor Hunter
  100. 1032        Major Hunter
  101. 1044        Minor Juggernaut
  102. 1056        Major Juggernaut
  103. 1068        Minor Looker ("Explodabug")
  104. 1080        Major Looker
  105. 1092        Invisible Looker
  106. 1104        Marathon Defense Drone
  107. 1116        Unused
  108. 1128        Unused
  109. 1130        Minor Trooper
  110. 1152        Major Trooper
  111. 1164        Minor Wasp
  112. 1176        Major Wasp
  113. 1188        Unused
  114. 1200        Unused
  115. 1212        Unused
  116. 1224        Unused
  117. 1236        Alien Leader
  118. 1248        Renegade Defense Drone
  119.  
  120.  
  121. =====================================================================
  122. Changing OPE to recognize new objects or aliens
  123. =====================================================================
  124.  
  125. If someone figures out how to add new objects or aliens to Marathon
  126. and you want OPE to recognize them, you can do so by modifying
  127. the STR# resources in OPE with Resorcerer or ResEdit.
  128.  
  129. STR# 130 -- contains character names.  Just add entries (the first
  130.                 one    you add will have offset 1260, the second will be
  131.                 1272, etc.).  A blank entry should terminate the list.
  132.                 NetEdit has an internal limit of 48 of these records
  133.                 (records beyond this are simply ignored).
  134. STR# 131 -- contains character comments.  Just be sure that there are
  135.                 at least as many strings in this resource as in 130.
  136.                 
  137. STR# 140 -- contains object names.  Just add entries (the first
  138.                 one    you add will have offset 252, the second will be
  139.                 264, etc.).  A blank entry should terminate the list.
  140.                 NetEdit has an internal limit of 28 of these records
  141.                 (records beyond this are simply ignored).
  142. STR# 141 -- contains object comments.  Just be sure that there are
  143.                 at least as many strings in this resource as in 140.
  144.                 
  145.                 
  146. =====================================================================
  147. Changing the Randomizer
  148. =====================================================================
  149.  
  150. Open the OPE application in ResEdit and open the STR# resources.
  151.  
  152. In resources STR# 132 and 142, OPE stores what type of object each
  153. entry is (for use by the Randomizer), according to the following
  154. scheme:
  155.  
  156. _typInvalid=0            the Randomizer will never place these
  157. _typWeapon=1            weapon
  158. _typAmmo=2                ammo
  159. _typGoodie=3            night vision, invisibility etc.
  160. _typMisc=4                defense center repair chips etc. (Randomizer
  161.                             ignores them)
  162. _typSmallAlien=5        small alien; placed randomly
  163. _typBigAlien=6            big alien (juggernaut, hulk) placed only in
  164.                             specific locations
  165. _typNeutral=8            the Bobs. 
  166. _typFriend=9            defense drones.
  167.  
  168. The amount of Bobs on a level is influenced partly by what you
  169. choose for "friends & goodies" in the randomizer window, but
  170. mostly by what you choose for aliens (since the Bobs get in the
  171. way I see them as an opponent just like any other alien).
  172.  
  173. You might want to change the Bobs to "friends" or change the hulks
  174. to "small" aliens so that they will be placed randomly.  To change
  175. the hulks, look in STR# 130; you'll see that the hulks are strings
  176. 18 and 19.  Go to STR# 132 strings 18 and 19, which are the hulk
  177. types (6=big alien, by default).  Change these strings to 5 and
  178. hulks will appear randomly.
  179.  
  180.  
  181. [end of file]
  182.